namespace SideShow.Driver.ComInterop
{
    using System;
    using System.Runtime.CompilerServices;
    using System.Runtime.InteropServices;

    #pragma warning disable 0108

    [ComImport, InterfaceType((short) 1), Guid("AE1162B9-8B11-4714-993D-93DC48CC9E8A"), TypeLibType((short) 0x200)]
    public interface IWDFIoQueue : IWDFObject
    {
        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
        void DeleteWdfObject();
        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
        void AssignContext([In, MarshalAs(UnmanagedType.Interface)] IObjectCleanup pCleanupCallback, [In] IntPtr pContext);
        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
        void RetrieveContext(out IntPtr ppvContext);
        [PreserveSig, MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
        void AcquireLock();
        [PreserveSig, MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
        void ReleaseLock();
        [PreserveSig, MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
        void GetDevice([MarshalAs(UnmanagedType.Interface)] out IWDFDevice ppWdfDevice);
        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
        void ConfigureRequestDispatching([In] _WDF_REQUEST_TYPE RequestType, [In] int Forward);
        [PreserveSig, MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
        _WDF_IO_QUEUE_STATE GetState(out uint pulNumOfRequestsInQueue, out uint pulNumOfRequestsInDriver);
        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
        void RetrieveNextRequest([MarshalAs(UnmanagedType.Interface)] out IWDFIoRequest ppRequest);
        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
        void RetrieveNextRequestByFileObject([In, MarshalAs(UnmanagedType.Interface)] IWDFFile pFile, [MarshalAs(UnmanagedType.Interface)] out IWDFIoRequest ppRequest);
        [PreserveSig, MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
        void Start();
        [PreserveSig, MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
        void Stop([In, MarshalAs(UnmanagedType.Interface)] IQueueCallbackStateChange pStopComplete);
        [PreserveSig, MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
        void StopSynchronously();
        [PreserveSig, MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
        void Drain([In, MarshalAs(UnmanagedType.Interface)] IQueueCallbackStateChange pDrainComplete);
        [PreserveSig, MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
        void DrainSynchronously();
        [PreserveSig, MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
        void Purge([In, MarshalAs(UnmanagedType.Interface)] IQueueCallbackStateChange pPurgeComplete);
        [PreserveSig, MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
        void PurgeSynchronously();
    }
}

